<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" href="/image/favicon.png">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login Success</title>
    <style>
        /* 全局样式 */
        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #6a11cb, #2575fc);
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        /* 成功消息容器 */
        .success-container {
            background: rgba(255, 255, 255, 0.1);
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
            text-align: center;
            width: 300px;
            animation: fadeIn 1s ease-in-out;
        }

        /* 标题样式 */
        h1 {
            font-size: 2.5em;
            margin-bottom: 20px;
            color: white;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 背景动画 */
        body::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 10.01%);
            background-size: 20px 20px;
            animation: moveBackground 10s linear infinite;
            z-index: -1;
        }

        @keyframes moveBackground {
            from {
                transform: translate(0, 0);
            }
            to {
                transform: translate(20px, 20px);
            }
        }

        /* 手机端适配 */
        @media (max-width: 768px) {
            .success-container {
                width: 90%; /* 手机端宽度增加 */
                padding: 20px; /* 减少内边距 */
            }

            h1 {
                font-size: 2em; /* 标题字体缩小 */
            }
        }

        /* 超小屏幕适配（如竖屏手机） */
        @media (max-width: 480px) {
            h1 {
                font-size: 1.8em; /* 进一步缩小标题字体 */
            }
        }
    </style>
</head>
<body>
    <div class="success-container">
        <h1>Login Successful!</h1>
        <p>You will be redirected to the homepage in <span id="countdown">5</span> seconds.</p>
    </div>

    <script>
        // 倒计时并跳转
        let countdown = 1;
        const countdownElement = document.getElementById('countdown');

        const timer = setInterval(() => {
            countdown--;
            countdownElement.textContent = countdown;

            if (countdown <= 0) {
                clearInterval(timer);
                window.location.href = 'home.html'; // 跳转到主页
            }
        }, 1000);
    </script>
</body>
</html>